
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>

<HEAD>
   <TITLE>gfinth_c</TITLE>
</HEAD>

<BODY style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<A name="TOP"></A>

<table style="text-align: left; margin-left: auto; margin-right: auto; width: 800px;"
 border="0" cellpadding="5" cellspacing="2">
  <tbody>
    <tr>
      <td style="background-color: rgb(153, 153, 153); vertical-align: middle; text-align: center;">
      <div align="right"> 
      <small><small><a href="index.html">Index Page</a></small></small>
      </div>
      <b>gfinth_c</b> </td>
    </tr>

    <tr>
      <td style="vertical-align: top;">

<small><div align="center">
<A HREF="index.html#A">A</A>&nbsp;
<A HREF="index.html#B">B</A>&nbsp;
<A HREF="index.html#C">C</A>&nbsp;
<A HREF="index.html#D">D</A>&nbsp;
<A HREF="index.html#E">E</A>&nbsp;
<A HREF="index.html#F">F</A>&nbsp;
<A HREF="index.html#G">G</A>&nbsp;
<A HREF="index.html#H">H</A>&nbsp;
<A HREF="index.html#I">I</A>&nbsp;
<A HREF="index.html#J">J</A>&nbsp;
<A HREF="index.html#K">K</A>&nbsp;
<A HREF="index.html#L">L</A>&nbsp;
<A HREF="index.html#M">M</A>&nbsp;
<A HREF="index.html#N">N</A>&nbsp;
<A HREF="index.html#O">O</A>&nbsp;
<A HREF="index.html#P">P</A>&nbsp;
<A HREF="index.html#Q">Q</A>&nbsp;
<A HREF="index.html#R">R</A>&nbsp;
<A HREF="index.html#S">S</A>&nbsp;
<A HREF="index.html#T">T</A>&nbsp;
<A HREF="index.html#U">U</A>&nbsp;
<A HREF="index.html#V">V</A>&nbsp;
<A HREF="index.html#W">W</A>&nbsp;
<A HREF="index.html#X">X</A>&nbsp;
</div></small>
       <br>
       <table style="text-align: left; width: 60%; margin-left: auto; margin-right: auto;"
       border="0" cellspacing="2" cellpadding="2">
        <tbody>
          <tr>
            <td style="width: 50%; text-align: center;">
            <small>
              <a href="#Procedure">Procedure<br></a>
              <a href="#Abstract">Abstract<br></a>
              <a href="#Required_Reading">Required_Reading<br></a>
              <a href="#Keywords">Keywords<br></a>
              <a href="#Brief_I/O">Brief_I/O<br></a>
              <a href="#Detailed_Input">Detailed_Input<br></a>

              </small>
              </td>
              <td style="vertical-align: top; width: 50%; text-align: center;">
              <small>               <a href="#Detailed_Output">Detailed_Output<br></a>
              <a href="#Parameters">Parameters<br></a>
              <a href="#Exceptions">Exceptions<br></a>
              <a href="#Files">Files<br></a>
              <a href="#Particulars">Particulars<br></a>
              <a href="#Examples">Examples<br></a>

              </small>
              </td>
              <td style="vertical-align: top; width: 50%; text-align: center;">
              <small>               <a href="#Restrictions">Restrictions<br></a>
              <a href="#Literature_References">Literature_References<br></a>
              <a href="#Author_and_Institution">Author_and_Institution<br></a>
              <a href="#Version">Version<br></a>
              <a href="#Index_Entries">Index_Entries<br></a>
             </small>
            </td>
          </tr>
        </tbody>
</table>

<h4><a name="Procedure">Procedure</a></h4>
<PRE>
   void gfinth_c ( int sigcode ) 

</PRE>
<h4><a name="Abstract">Abstract</a></h4>
<PRE>
   Respond to the interrupt signal SIGINT: save an indication
   that the signal has been received. This routine restores
   itself as the handler for SIGINT.
 </PRE>
<h4><a name="Required_Reading">Required_Reading</a></h4>
<PRE>
 
   <a href="../req/gf.html">GF</a>
 </PRE>
<h4><a name="Keywords">Keywords</a></h4>
<PRE>
 
   GEOMETRY
   SEARCH
   UTILITY 
 

</PRE>
<h4><a name="Brief_I/O">Brief_I/O</a></h4>
<PRE>
 
   VARIABLE  I/O  DESCRIPTION 
   --------  ---  -------------------------------------------------- 
   sigcode    I   Interrupt signal ID code.
 </PRE>
<h4><a name="Detailed_Input">Detailed_Input</a></h4>
<PRE>
 
   sigcode    is a signal code. `sigcode' is expected to be the 
              ANSI C parameter SIGINT, which represents the 
              interrupt signal.
   </PRE>
<h4><a name="Detailed_Output">Detailed_Output</a></h4>
<PRE>
 
   None.
 </PRE>
<h4><a name="Parameters">Parameters</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Exceptions">Exceptions</a></h4>
<PRE>
 
   1) If `sigcode' is not SIGINT, the error SPICE(INVALIDSIGNAL) 
      is signaled (in the SPICE error handling sense).

   2) If the call to the ANSI C function `signal' made
      by this routine fails, the error SPICE(SIGNALFAILED)
      is signaled (via SPICE error handling).
 </PRE>
<h4><a name="Files">Files</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Particulars">Particulars</a></h4>
<PRE>
   This interrupt handler should be used by routines that 
   participate in GF interrupt handling. Such routines should
   call the ANSI C library routine `signal' with the ANSI C
   macro SIGINT and this routine as the input arguments.

   When this routine executes, it re-establishes itself as the 
   handler for the interrupt signal SIGINT. Code that uses
   CSPICE interrupt handling must restore the previous
   handler before returning.

   Once this routine is established as the handler for the
   interrupt signal SIGINT, the GF &quot;bail out&quot; test routine
   <a href="gfbail_c.html">gfbail_c</a> will return SPICETRUE until the interrupt status
   is cleared via a call to <a href="gfclrh_c.html">gfclrh_c</a>.
 </PRE>
<h4><a name="Examples">Examples</a></h4>
<PRE>
 
   1)  Make this routine the GF signal handler, then restore
       the previous handler. This example serves only to
       demonstrate the use of signal; the example code
       performs no useful function.


       #include &lt;signal.h&gt;
       #include &quot;SpiceUsr.h&quot;

       int main()
       {
          /.
          Prototypes
          ./
          static void      ( * previousHandler )(int);
          static void      ( * handlerPtr      )(int);

          /.
          Make <b>gfinth_c</b> the handler for the SIGINT signal.
          ./
          previousHandler = signal ( SIGINT, <b>gfinth_c</b> );

          if ( previousHandler == SIG_ERR )
          {
             <a href="setmsg_c.html">setmsg_c</a> ( &quot;Attempt to establish <b>gfinth_c</b> as the &quot;
                        &quot;handler for the SIGINT signal failed.&quot; );
             <a href="sigerr_c.html">sigerr_c</a> ( &quot;SPICE(SIGNALFAILED)&quot;                   );
          }

          /.
          Restore the previous handler.
          ./
          handlerPtr = signal ( SIGINT, previousHandler );

          if ( handlerPtr == SIG_ERR )
          {
             <a href="setmsg_c.html">setmsg_c</a> ( &quot;Attempt to re-establish the previous &quot;
                        &quot;handler for the SIGINT signal failed.&quot; );
             <a href="sigerr_c.html">sigerr_c</a> ( &quot;SPICE(SIGNALFAILED)&quot;                   );
          }

          return ( 0 );

       }
 
</PRE>
<h4><a name="Restrictions">Restrictions</a></h4>
<PRE>
 
   None.
 </PRE>
<h4><a name="Literature_References">Literature_References</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Author_and_Institution">Author_and_Institution</a></h4>
<PRE>
 
   N.J. Bachman   (JPL) 
 </PRE>
<h4><a name="Version">Version</a></h4>
<PRE>
 
   -CSPICE Version 1.0.0, 25-FEB-2009 (NJB)
</PRE>
<h4><a name="Index_Entries">Index_Entries</a></h4>
<PRE>
 
   GF handle interrupt signal
 </PRE>
<h4>Link to routine gfinth_c source file <a href='../../../src/cspice/gfinth_c.c'>gfinth_c.c</a> </h4>

      </td>
    </tr>
  </tbody>
</table>

   <pre>Wed Jun  9 13:05:24 2010</pre>

</body>
</html>

